package com.xm.po;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
/**
* @Description: 用户信息实体类
* @Author: Mr.Wang
* @Date: 2020/8/6
*/
public class Users {
    //属性
    private Integer userId;
    //账号
    private String loginName;
    //安全码
    private Integer loginSecret;
    //密码
    private String loginPwd;
    //性别 0男 1女
    private Integer userSex;
    //用户类型 0普通会员 1门店用户
    private Integer userType;
    //用户名称
    private String userName;
    //QQ
    private String userQQ;
    //手机
    private String userPhone;
    //邮箱
    private String userEmail;
    //默认0，积分
    private Integer userScore=0;
    //头像
    private String userPhoto;
    //用户历史消费积分
    private Integer userTotalScore;
    //默认1，账户状态
    private Integer userStatus=1;
    //用户等级
    private Integer userLevel;
    //删除标志 -1删除 1有效
    private Integer userFlag;
    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    //最后登陆ip
    private String lastIP;
    //最后登陆时间
    private Date lastTime;
    //用户来源 1商城 2webapp 3手机版
    private Integer userFrom;
    //openId
    private String openId;
    //wxOpenId
    private String wxOpenId;
    //默认，0.00账户余额
    private Double userMoney;
    //冻结金额
    private Double lockMoney;
    //默认0，佣金
    private Integer distributMoney;
    //是否购买者 0是 1不是
    private Integer isBuyer;
    //支付密码
    private String payPwd;

    //构造器
    public Users() {
    }

    //注册信息
    public Users(String tel, String pwd) {
        this.userPhone = tel;
        this.loginPwd = pwd;
    }

    //最后登录
    public Users(Integer userId,Date lastTime){
        this.userId = userId;
        this.lastTime = lastTime;
    }
    public Users(Integer userId, String loginName, Integer loginSecret, String loginPwd, Integer userSex, Integer userType, String userName, String userQQ, String userPhone, String userEmail, Integer userScore, String userPhoto, Integer userTotalScore, Integer userStatus, Integer userLevel, Integer userFlag, Date createTime, String lastIP, Date lastTime, Integer userFrom, String openId, String wxOpenId, Double userMoney, Double lockMoney, Integer distributMoney, Integer isBuyer, String payPwd) {
        this.userId = userId;
        this.loginName = loginName;
        this.loginSecret = loginSecret;
        this.loginPwd = loginPwd;
        this.userSex = userSex;
        this.userType = userType;
        this.userName = userName;
        this.userQQ = userQQ;
        this.userPhone = userPhone;
        this.userEmail = userEmail;
        this.userScore = userScore;
        this.userPhoto = userPhoto;
        this.userTotalScore = userTotalScore;
        this.userStatus = userStatus;
        this.userLevel = userLevel;
        this.userFlag = userFlag;
        this.createTime = createTime;
        this.lastIP = lastIP;
        this.lastTime = lastTime;
        this.userFrom = userFrom;
        this.openId = openId;
        this.wxOpenId = wxOpenId;
        this.userMoney = userMoney;
        this.lockMoney = lockMoney;
        this.distributMoney = distributMoney;
        this.isBuyer = isBuyer;
        this.payPwd = payPwd;
    }

    //getter setter方法
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginSecret(Integer loginSecret) {
        this.loginSecret = loginSecret;
    }

    public Integer getLoginSecret() {
        return loginSecret;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd;
    }

    public String getLoginPwd() {
        return loginPwd;
    }

    public void setUserSex(Integer userSex) {
        this.userSex = userSex;
    }

    public Integer getUserSex() {
        return userSex;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserQQ(String userQQ) {
        this.userQQ = userQQ;
    }

    public String getUserQQ() {
        return userQQ;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserScore(Integer userScore) {
        this.userScore = userScore;
    }

    public Integer getUserScore() {
        return userScore;
    }

    public void setUserPhoto(String userPhoto) {
        this.userPhoto = userPhoto;
    }

    public String getUserPhoto() {
        return userPhoto;
    }

    public void setUserTotalScore(Integer userTotalScore) {
        this.userTotalScore = userTotalScore;
    }

    public Integer getUserTotalScore() {
        return userTotalScore;
    }

    public void setUserStatus(Integer userStatus) {
        this.userStatus = userStatus;
    }

    public Integer getUserStatus() {
        return userStatus;
    }

    public void setUserLevel(Integer userLevel) {
        this.userLevel = userLevel;
    }

    public Integer getUserLevel() {
        return userLevel;
    }

    public void setUserFlag(Integer userFlag) {
        this.userFlag = userFlag;
    }

    public Integer getUserFlag() {
        return userFlag;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setLastIP(String lastIP) {
        this.lastIP = lastIP;
    }

    public String getLastIP() {
        return lastIP;
    }

    public void setLastTime(Date lastTime) {
        this.lastTime = lastTime;
    }

    public Date getLastTime() {
        return lastTime;
    }

    public void setUserFrom(Integer userFrom) {
        this.userFrom = userFrom;
    }

    public Integer getUserFrom() {
        return userFrom;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getOpenId() {
        return openId;
    }

    public void setWxOpenId(String wxOpenId) {
        this.wxOpenId = wxOpenId;
    }

    public String getWxOpenId() {
        return wxOpenId;
    }

    public void setUserMoney(Double userMoney) {
        this.userMoney = userMoney;
    }

    public Double getUserMoney() {
        return userMoney;
    }

    public void setLockMoney(Double lockMoney) {
        this.lockMoney = lockMoney;
    }

    public Double getLockMoney() {
        return lockMoney;
    }

    public void setDistributMoney(Integer distributMoney) {
        this.distributMoney = distributMoney;
    }

    public Integer getDistributMoney() {
        return distributMoney;
    }

    public void setIsBuyer(Integer isBuyer) {
        this.isBuyer = isBuyer;
    }

    public Integer getIsBuyer() {
        return isBuyer;
    }

    public void setPayPwd(String payPwd) {
        this.payPwd = payPwd;
    }

    public String getPayPwd() {
        return payPwd;
    }

    public String toString() {
        return "Users [userId=" + userId + ", loginName=" + loginName + ", loginSecret=" + loginSecret + ", loginPwd=" + loginPwd + ", userSex=" + userSex + ", userType=" + userType + ", userName=" + userName + ", userQQ=" + userQQ + ", userPhone=" + userPhone + ", userEmail=" + userEmail + ", userScore=" + userScore + ", userPhoto=" + userPhoto + ", userTotalScore=" + userTotalScore + ", userStatus=" + userStatus + ", userLevel=" + userLevel + ", userFlag=" + userFlag + ", createTime=" + createTime + ", lastIP=" + lastIP + ", lastTime=" + lastTime + ", userFrom=" + userFrom + ", openId=" + openId + ", wxOpenId=" + wxOpenId + ", userMoney=" + userMoney + ", lockMoney=" + lockMoney + ", distributMoney=" + distributMoney + ", isBuyer=" + isBuyer + ", payPwd=" + payPwd + "]";
    }
}

